function checkFile(){
	var validated = true;
	var file1Value = document.getElementById("file1").value;

	if(file1Value.indexOf(".java") == -1){
		document.getElementById("fileError").style.display = "inline";
		validated = false;
	}else{
		document.getElementById("emailError").style.display = "none";
	}

	return validated;
}
